/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.dao;

import com.xy.biz.xd.domain.bo.DocumentReleaseCheckBO;
import com.xy.biz.xd.domain.po.DocumentReleaseCheckPO;
import com.xy.biz.xd.domain.po.DocumentReleasePO;
import com.xy.biz.xd.domain.query.DocumentReleaseCheckQuery;
import com.xy.biz.xd.domain.query.DocumentReleaseQuery;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 *
 *
 * @author zsp
 * @date 2021-4-27
 */
public interface DocumentReleaseCheckDao {

	/**
	 * 保存
	 *
	 * @param documentReleaseCheckPO
	 */
	int saveDocumentReleaseCheck(DocumentReleaseCheckPO documentReleaseCheckPO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllDocumentReleaseCheck(Collection<DocumentReleaseCheckPO> collection);

	/**
	 * 更新
	 *
	 * @param documentReleaseCheckPO
	 */
	int updateDocumentReleaseCheck(DocumentReleaseCheckPO documentReleaseCheckPO);

	/**
	 * 删除
	 *
	 * @param documentReleaseCheckId
	 */
	int deleteDocumentReleaseCheck(Long documentReleaseCheckId);

	/**
	 * 查找一个
	 *
	 * @param documentReleaseCheckId
	 * @return
	 */
	DocumentReleaseCheckPO getDocumentReleaseCheck(Long documentReleaseCheckId);

	/**
	 * 查找一个
	 *
	 * @param documentReleaseCheckPO
	 * @return
	 */
	DocumentReleaseCheckPO getDocumentReleaseCheckByRelease(DocumentReleaseCheckPO documentReleaseCheckPO);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<DocumentReleaseCheckPO> listDocumentReleaseCheckById(Collection<Long> collection);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<DocumentReleaseCheckPO> listDocumentReleaseCheckByReleaseId(Collection<Long> collection);

	/**
	 * 查找多条
	 *
	 * @param query
	 * @return
	 */
	List<DocumentReleaseCheckPO> listDocumentReleaseCheckByRepositoryIdAndSourceFolderId(DocumentReleaseCheckQuery query);

	/**
	 * 查询当前用户的签收列表
	 * @param repositoryId
	 * @param collect  releaseId
	 * @return
	 */
	List<DocumentReleaseCheckPO> listDocumentReleaseCheckByRepositoryIdAndDocumentReleaseId(Long repositoryId, Set<Long> collect);

	/**
	 * 逻辑删除签收记录,多条
	 * @param documentReleaseIds
	 * @return
	 */
    int deleteDocumentReleaseCheckByDocumentReleaseId(Collection<Long> documentReleaseIds);
}
